package cn.zkc.library.service;

import cn.zkc.library.dao.UserDAO;
import cn.zkc.library.modal.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author kay
 * @version 1.0
 * @date 2020/6/27 18:07
 * @description
 */
@Service
public class UserService {

    @Autowired
    private UserDAO userDAO;

    public User getUser(String email) {
        return userDAO.selectByEmail(email);
    }

    public void addUser(User user) {
        userDAO.addUser(user);
    }

    public User getUser(int uid) {
        return userDAO.selectById(uid);
    }

}
